<template>
  <el-dialog :visible.sync="visible" v-dialogDrag :close-on-click-modal="false" class="tl-dialog" width="900px" @open="open" @close="close" destroy-on-close>
    <div slot="title" style="font-family: '思源黑体 CN', sans-serif; font-weight: 400; font-style: normal; font-size: 16px !important;">
      {{title}}
    </div>
    <history-list ref="historyList" source-type="MpmProject" :show-title-flag="false"></history-list>
    <div slot="footer" class="dialog-footer">
      <el-button style="padding: 7px 15px;border: 1px solid;" :type="'text'" @click="doCancelEdit">取消</el-button>
    </div>
  </el-dialog>
</template>

<script>
/** mixins */
import { mixin_edit } from '@tapui/mixins/mixin_edit'
/** 子组件 */
import historyList from "./historyList"
/** 工具类 */
import { putAction, getAction, postAction, deleteAction } from '@tapui/utils/http'
/** VUE配置 */
export default {
  mixins: [mixin_edit],
  components: { historyList },
  data() {
    return {
      moduleTitle: '评论表',
      urlPrefix: '/mpm/comments/',
      url: {
        // 额外的url
      },
      title: '历史留言',
      parentModel: {}
    }
  },
  methods: {
    open() {
      // 页面加载完毕执行
      this.$nextTick(() => {
        this.$refs.historyList.sourceId = this.parentModel.id
        this.$refs.historyList.queryCommentList()
      })
    }
  }
}
</script>
<style lang="less" scoped>
  /deep/.el-dialog__body {
    padding: 5px 20px !important;
    padding-bottom: 0;
  }
  /deep/ .el-dialog__footer {
    padding: 10px 20px 20px !important;
  }
  /deep/ .el-form-item--mini.el-form-item {
    margin-right: 0;
  }
</style>
